/**
 * Created by Administrator on 2017/2/15.
 */

$(function(){
    $('.edit').each(function(){
        $url=test_url;
        $(this).click(function(){
            $id=$(this).attr('tip');
            if(confirm("是否执行该操作")){
                var data={
                    _cmd:'sendmobile_receive_mobile',
                    apply_id:$id
                    //cate_id:'',
                    //order:'',
                    //ticket:getCookie('ticket')
                }
                post(data,function(da){
                    location.reload();
                }, function(error) {
                    layer.open({
                        content: error.info,
                        btn: ['返回']
                    });
                });
            }
        });
    });

    $('.del').each(function(){
        $(this).click(function(){
            if(confirm("是否执行该操作")) {
                $url = $(this).attr("url");
                $apply_id = $(this).attr("apply_id");
                $.ajax({
                    type: "GET",
                    url: $url,
                    data: {apply_id: $apply_id},
                    dataType: "json",
                    success: function (data) {
                        if (data.code == 200) {
                            alert(data.message);
                            location.reload()
                        } else {
                            alert(data.message);
                            return;
                        }
                    }
                });
            }
        });
    });




})